
import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:jufei/banner/banner.dart';
import 'package:jufei/splash/splash.dart';

part 'package:jufei/callback.dart';

class Jufei {
  static const MethodChannel _channel =
      const MethodChannel('jufei');
  ///# 初始化
  static Future init()async{
    return await _channel.invokeMethod('init');
  }

  ///# 开屏广告
  static Widget  showSplash({
    required SplashCallBack splashCallBack
  }){return SplishView(
    splashCallBack: splashCallBack,
  );
  }

  ///# 展示banner广告
  ///
  static Widget showBanner({
    required BannerCallBack bannerCallBack
  }){
    return BannerView(bannerCallBack: bannerCallBack,); 
  }

  ///# 激励视频
  ///
  static Future<bool>  getRewardVideoAd()async{
    return await _channel.invokeMethod("getRewardVideoAd");
  } 

  ///# 全屏视频广告
  ///
  static Future<bool> getFullVideoAd()async{
    return await _channel.invokeMethod("getFullVideoAd");
  }




}
